/*  1:   */ package com.atomikos.icatch.imp;
/*  2:   */ 
/*  3:   */ import com.atomikos.icatch.HeurCommitException;
/*  4:   */ import com.atomikos.icatch.HeurHazardException;
/*  5:   */ import com.atomikos.icatch.HeurMixedException;
/*  6:   */ import com.atomikos.icatch.HeurRollbackException;
/*  7:   */ import com.atomikos.icatch.HeuristicMessage;
/*  8:   */ import com.atomikos.icatch.RollbackException;
/*  9:   */ import com.atomikos.icatch.SysException;
/* 10:   */ import com.atomikos.icatch.TxState;
/* 11:   */ 
/* 12:   */ class HeurCommittedStateHandler
/* 13:   */   extends CoordinatorStateHandler
/* 14:   */ {
/* 15:   */   HeurCommittedStateHandler(CoordinatorImp coordinator)
/* 16:   */   {
/* 17:47 */     super(coordinator);
/* 18:   */   }
/* 19:   */   
/* 20:   */   HeurCommittedStateHandler(CoordinatorStateHandler previous)
/* 21:   */   {
/* 22:52 */     super(previous);
/* 23:   */   }
/* 24:   */   
/* 25:   */   protected Object getState()
/* 26:   */   {
/* 27:57 */     return TxState.HEUR_COMMITTED;
/* 28:   */   }
/* 29:   */   
/* 30:   */   protected void onTimeout() {}
/* 31:   */   
/* 32:   */   protected void setGlobalSiblingCount(int count) {}
/* 33:   */   
/* 34:   */   protected int prepare()
/* 35:   */     throws RollbackException, IllegalStateException, HeurHazardException, HeurMixedException, SysException
/* 36:   */   {
/* 37:75 */     throw new HeurHazardException(getHeuristicMessages());
/* 38:   */   }
/* 39:   */   
/* 40:   */   protected HeuristicMessage[] commit(boolean onePhase)
/* 41:   */     throws HeurRollbackException, HeurMixedException, HeurHazardException, IllegalStateException, RollbackException, SysException
/* 42:   */   {
/* 43:86 */     TerminatedStateHandler termStateHandler = new TerminatedStateHandler(this);
/* 44:   */     
/* 45:88 */     getCoordinator().setStateHandler(termStateHandler);
/* 46:89 */     return getHeuristicMessages();
/* 47:   */   }
/* 48:   */   
/* 49:   */   protected HeuristicMessage[] rollback()
/* 50:   */     throws HeurCommitException, HeurMixedException, SysException, HeurHazardException, IllegalStateException
/* 51:   */   {
/* 52:98 */     throw new HeurCommitException(getHeuristicMessages());
/* 53:   */   }
/* 54:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.HeurCommittedStateHandler
 * JD-Core Version:    0.7.0.1
 */